<?
/** @file
 * @author Andrzej Mararok Wasiak (mararok@gmail.com)
 */
 
/** Results for action.
 */
class ActionResult {
   private $Result = array();
   
   function set($key,$value) {
      $this->Result[$key] = $value;
   }
   
   function get($key) {
      return $this->Result[$key];
   }
   
   function getAll() {
        return $this->Result;
    }
   
   /** Converting results to json.
    */
   function toJSON() {
      return json_encode($this->Result);
   }
   
   function __toString() {
      return $this->toJSON();
   }
}

?>